<template>
  <!-- 新增编辑弹窗 -->
  <div>
    <el-dialog title="提示" :visible.sync="addUser" :before-close="cancel">
      <el-form ref="form" :model="form" label-width="140px" :rules="rules">
        <el-form-item label="企业名称">
          <el-input v-model="form.shortName" />
        </el-form-item>
        <el-form-item label="所属公司">
          <el-input v-model="form.company" />
        </el-form-item>
        <div class="annotation">
          https://www.tianyancha.com （在此可查询所属公司全称及简称）
        </div>
        <el-form-item label="城市地区">
          <el-select v-model="form.province" placeholder="请选择活动区域">
            <el-option label="区域一" value="shanghai" />
            <el-option label="区域二" value="beijing" />
          </el-select>
          <el-select v-model="form.city" placeholder="请选择活动区域">
            <el-option label="区域一" value="shanghai" />
            <el-option label="区域二" value="beijing" />
          </el-select>
        </el-form-item>
        <el-form-item label="方向（企业标签）">
          <el-input v-model="form.tags" />
        </el-form-item>
        <el-form-item label="备注">
          <el-input v-model="form.remarks" type="textarea" />
        </el-form-item>
      </el-form>
      <template #footer>
        <el-button @click="cancel">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">
          确 定
        </el-button>
      </template>
    </el-dialog>
  </div>
</template>
<script>
export default {
  props: {
    addUser: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      form: {
        shortName: '',
        company: '',
        province: '',
        city: '',
        tags: '',
        remarks: ''
      },
      rules: {}
    }
  },

  methods: {
    // 弹窗内的取消
    cancel() {
      this.$emit('update:addUser', false)
    }
  }
}
</script>
<style scoped lang="scss">
// 弹窗
::v-deep {
  .el-dialog {
    border-radius: 10px;
  }
}
::v-deep {
  .el-dialog__header {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    background-color: #409eff;
  }
}
.el-input {
  width: 460px;
}
.el-select {
  margin-right: 10px;
}
.el-textarea {
  width: 460px;
}
// 注释
.annotation {
  width: 100%;
  text-align: center;
  padding-bottom: 30px;
}
// 按钮
::v-deep {
  .el-dialog__footer {
    text-align: center;
  }
}
</style>
